import request from "../../../utils/request";
import { Commodity, CommodityFormData, CommodityResponseData } from "./type";
enum API {
    // 获取 扶贫商品 信息 POST
    GETCOMMODITYINFO_URL = '/product/selectProductPage',
    // 新增 编辑 扶贫商品信息 POST
    OPERATECOMMODITYINFO_URL = '/product/productAdit',
    // 删除 扶贫商品信息 POST
    DELETECOMMODITY_URL = '/product/productDel'
}
export const reqGetCommodityInfo = (data: CommodityFormData) => request.post<any, CommodityResponseData>(API.GETCOMMODITYINFO_URL, data)
export const reqOperateCommodityInfo = (data: Commodity) => request.post<any, any>(API.OPERATECOMMODITYINFO_URL, data)
export const reqDeleteCommodityInfo = (data: Commodity) => request.post<any, any>(API.DELETECOMMODITY_URL, data)